﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProyectoFinal.Alquileres
{
    public partial class regresarAlquiler : System.Web.UI.Page
    {
        ServiceAlquileres.WebServiceAlquileresSoapClient objWsAlquileres = new ServiceAlquileres.WebServiceAlquileresSoapClient();
        protected void Page_Load(object sender, EventArgs e)
        {
            this.cargarListaAlquileres();
        }
        protected void cargarListaAlquileres()
        {
            //devuelve lista completa para mostrar registros
            DataSet ds = objWsAlquileres.devolverAlquileres();
            gvAlquileres.DataSource = ds;
            gvAlquileres.DataBind();


        }

        protected void gvAlquileres_RowCommand(object sender, GridViewCommandEventArgs e)
        {
             GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
            int fila = Convert.ToInt32(row.RowIndex);
            int Numero_Alquiler = Convert.ToInt32(gvAlquileres.DataKeys[fila].Value);

            if (e.CommandName == "regresar")
            { 

            }
        }

        protected void gvAlquileres_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {

        }
    }
}